<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">
    <a-card :bordered="false">
      <j-form-container>
        <a-form-model ref="form" :model="model" slot="detail">
          <a-row>
            <a-col :span="24" >
              <a-form-model-item label="申请原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reason">
                <a-textarea v-model="model.reason" placeholder="请输入申请原因"></a-textarea>
              </a-form-model-item>
              <a-form-model-item label="建房面积" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="area">
                <a-input v-model="model.area" placeholder="请输入建房面积" ></a-input>
              </a-form-model-item>
              <a-form-model-item label="东至" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="east">
                <a-input v-model="model.east" placeholder="请输入东至" ></a-input>
              </a-form-model-item>
              <a-form-model-item label="南至" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="south">
                <a-input v-model="model.south" placeholder="请输入南至" ></a-input>
              </a-form-model-item>
              <a-form-model-item label="西至" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="west">
                <a-input v-model="model.west" placeholder="请输入西至" ></a-input>
              </a-form-model-item>
              <a-form-model-item label="北至" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="north">
                <a-input v-model="model.north" placeholder="请输入北至" ></a-input>
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-form-model>
      </j-form-container>
    </a-card>
  </j-modal>
</template>

<script>

import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { mixinDevice } from '@/utils/mixin'

export default {
  name: 'VcaBuildApplyModal',
  mixins:[JeecgListMixin, mixinDevice],
  data() {
    return {
      model:{},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      title:'',
      width:600,
      visible: false,
      disableMixinCreated:true,
      disableSubmit: false,
    }
  },
  methods:{
    init(record){
      this.model = Object.assign({},record);
      this.visible=true;
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
    submitCallback(){
      this.$emit('ok');
      this.visible = false;
    },
    handleCancel () {
      this.close()
    },
    handleOk(){
      fullParamData(this.model);
      this.visible = false;
    }
  }
}
</script>

<style scoped>
</style>